package domain;

import java.util.Date;

public class UserRelation {
	private Integer id;
	// 父類ID
	private Integer fuid;
	private Integer uid;
	
	private String registerName;
	// 注册时间 在數據庫端是設置為dateTime
	private Date registerDate;
	// 登录时间
	private Date loginDate;
	// component
	private Address address;
	private UserInfomation userInfomation;
	private String email;
	
	
	
	public UserRelation() {
		super();
	}
	
	public UserRelation(User user) {
		super();
		this.uid = user.getId();
		this.registerName = user.getRegisterName();
		this.registerDate = user.getRegisterDate();
		this.loginDate = user.getLoginDate();
		this.address = user.getAddress();
		this.userInfomation = user.getUserInfomation();
		this.email = user.getEmail();
	}
	/**
	 * @return the id
	 */
	public Integer getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(Integer id) {
		this.id = id;
	}
	/**
	 * @return the registerName
	 */
	public String getRegisterName() {
		return registerName;
	}
	/**
	 * @param registerName the registerName to set
	 */
	public void setRegisterName(String registerName) {
		this.registerName = registerName;
	}
	/**
	 * @return the registerDate
	 */
	public Date getRegisterDate() {
		return registerDate;
	}
	/**
	 * @param registerDate the registerDate to set
	 */
	public void setRegisterDate(Date registerDate) {
		this.registerDate = registerDate;
	}
	/**
	 * @return the loginDate
	 */
	public Date getLoginDate() {
		return loginDate;
	}
	/**
	 * @param loginDate the loginDate to set
	 */
	public void setLoginDate(Date loginDate) {
		this.loginDate = loginDate;
	}
	/**
	 * @return the address
	 */
	public Address getAddress() {
		return address;
	}
	/**
	 * @param address the address to set
	 */
	public void setAddress(Address address) {
		this.address = address;
	}
	/**
	 * @return the userInfomation
	 */
	public UserInfomation getUserInfomation() {
		return userInfomation;
	}
	/**
	 * @param userInfomation the userInfomation to set
	 */
	public void setUserInfomation(UserInfomation userInfomation) {
		this.userInfomation = userInfomation;
	}
	/**
	 * @return the email
	 */
	public String getEmail() {
		return email;
	}
	/**
	 * @param email the email to set
	 */
	public void setEmail(String email) {
		this.email = email;
	}
	/**
	 * @return the uid
	 */
	public Integer getUid() {
		return uid;
	}
	/**
	 * @param uid the uid to set
	 */
	public void setUid(Integer uid) {
		this.uid = uid;
	}
	/**
	 * @return the fuid
	 */
	public Integer getFuid() {
		return fuid;
	}
	/**
	 * @param fuid the fuid to set
	 */
	public void setFuid(Integer fuid) {
		this.fuid = fuid;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "UserRelation [id=" + id + ", uid=" + uid + ", registerName=" + registerName + ", registerDate="
			+ registerDate + ", loginDate=" + loginDate + ", address=" + address + ", userInfomation=" + userInfomation
			+ ", email=" + email + "]";
	}


}
